package com.github.kotvertolet.youtubejextractor.models.newModels;

import com.google.gson.annotations.SerializedName;
import ohos.utils.Parcel;
import ohos.utils.Sequenceable;

import java.io.Serializable;

public class OpenPopupAction implements Sequenceable, Serializable {


    @SerializedName("popupType")
    private String popupType;

    @SerializedName("popup")
    private Popup popup;


    public static final Sequenceable.Producer<OpenPopupAction> CREATOR = new Producer<OpenPopupAction>() {
        @Override
        public OpenPopupAction createFromParcel(Parcel parcel) {
            // Initialize an instance first, then do customized unmarshlling.
            OpenPopupAction openPopupAction = new OpenPopupAction();
            openPopupAction.unmarshalling(parcel);
            return openPopupAction;
        }
    };


    @Override
    public boolean marshalling(Parcel parcel) {
        parcel.writeString(this.popupType);
        parcel.writeSequenceable(this.popup);
        return true;
    }

    @Override
    public boolean unmarshalling(Parcel parcel) {
        this.popupType = parcel.readString();
        parcel.readSequenceable(this.popup);
        return true;
    }

    @Override
    public String toString() {
        return "OpenPopupAction{" +
                "popupType='" + popupType + '\'' +
                ", popup=" + popup +
                '}';
    }

    public String getPopupType() {
        return popupType;
    }

    public void setPopupType(String popupType) {
        this.popupType = popupType;
    }

    public Popup getPopup() {
        return popup;
    }

    public void setPopup(Popup popup) {
        this.popup = popup;
    }
}
